﻿using ConfExpert.Datasets;
using DevExpress.XtraReports.UI;
using DevTeam;
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Drawing.Printing;

public class xrKesimBilgiFormu : DevExpress.XtraReports.UI.XtraReport
{
    #region Designer generated code

    #region Members
    private DevExpress.XtraReports.UI.DetailBand Detail;
    private DevExpress.XtraReports.UI.TopMarginBand TopMargin;
    private DevExpress.XtraReports.UI.BottomMarginBand BottomMargin;
    private MyData oMyData;
    private ReportFooterBand ReportFooter;
    private ReportHeaderBand ReportHeader;
    private XRPictureBox xrPictureBox1;
    private XRLabel x1;
    private DetailBand HeaderBand;
    private DetailReportBand Header;
    private DetailReportBand DetailReport;
    private DetailBand DetailBand;
    private XRTable xrTable3;
    private XRTableRow xrTableRow3;
    private XRTableCell x2;
    private XRTableCell x2a;
    private XRTableRow xrTableRow5;
    private XRTableCell x3;
    private XRTableCell x3a;
    private XRControlStyle xrControlStyle1;
    private XRTable xtGarni;
    private XRTableRow xrTableRow33;
    private XRTableCell xrTableCell37;
    private PageFooterBand PageFooter;
    private XRPageInfo xrPageInfo1; 
    #endregion

    private XRLine xrLine1;
    private XRTableRow xrTableRow20;
    private XRTableCell x36;
    private XRTableCell x4a;
    private XRTable tbMD;
    private XRTableRow xrTableRow2;
    private XRTableCell xrTableCell14;
    private XRTableRow xrTableRow7;
    private XRTableCell xrTableCell1;
    private XRTableCell tcTermin;
    private XRTable tbStyle;
    private XRTableRow xrTableRow1;
    private XRTableCell xrTableCell2;
    private XRTable xrTable1;
    private XRTableRow xrTableRow9;
    private XRTableCell xrTableCell5;
    private XRTable xrTable2;
    private XRTableRow xrTableRow11;
    private XRTableCell tcDosyaNo;
    private GroupHeaderBand GroupHeader1;
    private XRTable tbGarniHeader;
    private XRTableRow xrTableRow4;
    private XRTableCell xrTableCell3;
    private XRTable tbBedenEsleme;
    private XRTableRow trBedenDagilim;
    private XRTableCell xrTableCell4;

    private System.ComponentModel.IContainer components = null;

    private void InitializeComponent()
    {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(xrKesimBilgiFormu));
            this.Detail = new DevExpress.XtraReports.UI.DetailBand();
            this.TopMargin = new DevExpress.XtraReports.UI.TopMarginBand();
            this.BottomMargin = new DevExpress.XtraReports.UI.BottomMarginBand();
            this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand();
            this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
            this.xrControlStyle1 = new DevExpress.XtraReports.UI.XRControlStyle();
            this.PageFooter = new DevExpress.XtraReports.UI.PageFooterBand();
            this.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
            this.xrTableRow11 = new DevExpress.XtraReports.UI.XRTableRow();
            this.tcDosyaNo = new DevExpress.XtraReports.UI.XRTableCell();
            this.oMyData = new ConfExpert.Datasets.MyData();
            this.xrPageInfo1 = new DevExpress.XtraReports.UI.XRPageInfo();
            this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
            this.DetailBand = new DevExpress.XtraReports.UI.DetailBand();
            this.xtGarni = new DevExpress.XtraReports.UI.XRTable();
            this.xrTableRow33 = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell37 = new DevExpress.XtraReports.UI.XRTableCell();
            this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
            this.tbGarniHeader = new DevExpress.XtraReports.UI.XRTable();
            this.xrTableRow4 = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrLine1 = new DevExpress.XtraReports.UI.XRLine();
            this.Header = new DevExpress.XtraReports.UI.DetailReportBand();
            this.HeaderBand = new DevExpress.XtraReports.UI.DetailBand();
            this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
            this.xrTableRow9 = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
            this.tbStyle = new DevExpress.XtraReports.UI.XRTable();
            this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
            this.tbMD = new DevExpress.XtraReports.UI.XRTable();
            this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTable3 = new DevExpress.XtraReports.UI.XRTable();
            this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow();
            this.x2 = new DevExpress.XtraReports.UI.XRTableCell();
            this.x2a = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableRow5 = new DevExpress.XtraReports.UI.XRTableRow();
            this.x3 = new DevExpress.XtraReports.UI.XRTableCell();
            this.x3a = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableRow7 = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
            this.tcTermin = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableRow20 = new DevExpress.XtraReports.UI.XRTableRow();
            this.x36 = new DevExpress.XtraReports.UI.XRTableCell();
            this.x4a = new DevExpress.XtraReports.UI.XRTableCell();
            this.x1 = new DevExpress.XtraReports.UI.XRLabel();
            this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
            this.tbBedenEsleme = new DevExpress.XtraReports.UI.XRTable();
            this.trBedenDagilim = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
            ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.oMyData)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.xtGarni)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tbGarniHeader)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tbStyle)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tbMD)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tbBedenEsleme)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            // 
            // Detail
            // 
            this.Detail.Dpi = 254F;
            this.Detail.Expanded = false;
            this.Detail.HeightF = 0F;
            this.Detail.Name = "Detail";
            this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 254F);
            this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
            // 
            // TopMargin
            // 
            this.TopMargin.Dpi = 254F;
            this.TopMargin.HeightF = 33F;
            this.TopMargin.Name = "TopMargin";
            this.TopMargin.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 254F);
            this.TopMargin.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
            // 
            // BottomMargin
            // 
            this.BottomMargin.Dpi = 254F;
            this.BottomMargin.HeightF = 30F;
            this.BottomMargin.Name = "BottomMargin";
            this.BottomMargin.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 254F);
            this.BottomMargin.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
            // 
            // ReportFooter
            // 
            this.ReportFooter.Dpi = 254F;
            this.ReportFooter.Expanded = false;
            this.ReportFooter.HeightF = 0F;
            this.ReportFooter.Name = "ReportFooter";
            // 
            // ReportHeader
            // 
            this.ReportHeader.Dpi = 254F;
            this.ReportHeader.HeightF = 0F;
            this.ReportHeader.Name = "ReportHeader";
            // 
            // xrControlStyle1
            // 
            this.xrControlStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
            this.xrControlStyle1.Name = "xrControlStyle1";
            this.xrControlStyle1.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 254F);
            // 
            // PageFooter
            // 
            this.PageFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
            this.xrTable2,
            this.xrPageInfo1});
            this.PageFooter.Dpi = 254F;
            this.PageFooter.HeightF = 64F;
            this.PageFooter.Name = "PageFooter";
            // 
            // xrTable2
            // 
            this.xrTable2.Dpi = 254F;
            this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(2559.208F, 0F);
            this.xrTable2.Name = "xrTable2";
            this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
            this.xrTableRow11});
            this.xrTable2.SizeF = new System.Drawing.SizeF(203.7292F, 58.42F);
            // 
            // xrTableRow11
            // 
            this.xrTableRow11.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.tcDosyaNo});
            this.xrTableRow11.Dpi = 254F;
            this.xrTableRow11.Name = "xrTableRow11";
            this.xrTableRow11.Weight = 1D;
            // 
            // tcDosyaNo
            // 
            this.tcDosyaNo.BorderColor = System.Drawing.Color.Red;
            this.tcDosyaNo.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", this.oMyData, "xWBHeader.DosyaNo")});
            this.tcDosyaNo.Dpi = 254F;
            this.tcDosyaNo.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Bold);
            this.tcDosyaNo.ForeColor = System.Drawing.Color.Red;
            this.tcDosyaNo.Name = "tcDosyaNo";
            this.tcDosyaNo.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 0, 0, 0, 254F);
            this.tcDosyaNo.StylePriority.UseBorderColor = false;
            this.tcDosyaNo.StylePriority.UseFont = false;
            this.tcDosyaNo.StylePriority.UseForeColor = false;
            this.tcDosyaNo.StylePriority.UsePadding = false;
            this.tcDosyaNo.StylePriority.UseTextAlignment = false;
            this.tcDosyaNo.Text = "tcDosyaNo";
            this.tcDosyaNo.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
            this.tcDosyaNo.Weight = 3D;
            // 
            // oMyData
            // 
            this.oMyData.DataSetName = "MyData";
            this.oMyData.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
            // 
            // xrPageInfo1
            // 
            this.xrPageInfo1.Dpi = 254F;
            this.xrPageInfo1.LocationFloat = new DevExpress.Utils.PointFloat(2762.937F, 0F);
            this.xrPageInfo1.Name = "xrPageInfo1";
            this.xrPageInfo1.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254F);
            this.xrPageInfo1.RunningBand = this.DetailReport;
            this.xrPageInfo1.SizeF = new System.Drawing.SizeF(119.0625F, 58.42F);
            this.xrPageInfo1.StylePriority.UseTextAlignment = false;
            this.xrPageInfo1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
            // 
            // DetailReport
            // 
            this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
            this.DetailBand,
            this.GroupHeader1});
            this.DetailReport.DataMember = "xWBHeader.FK_xWBDetail_xWBHeader_style";
            this.DetailReport.DataSource = this.oMyData;
            this.DetailReport.Dpi = 254F;
            this.DetailReport.Level = 0;
            this.DetailReport.Name = "DetailReport";
            // 
            // DetailBand
            // 
            this.DetailBand.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
            this.xtGarni});
            this.DetailBand.Dpi = 254F;
            this.DetailBand.HeightF = 63.5F;
            this.DetailBand.KeepTogether = true;
            this.DetailBand.MultiColumn.ColumnCount = 2;
            this.DetailBand.Name = "DetailBand";
            // 
            // xtGarni
            // 
            this.xtGarni.Dpi = 254F;
            this.xtGarni.LocationFloat = new DevExpress.Utils.PointFloat(39.1521F, 0F);
            this.xtGarni.Name = "xtGarni";
            this.xtGarni.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
            this.xrTableRow33});
            this.xtGarni.SizeF = new System.Drawing.SizeF(500F, 63.5F);
            // 
            // xrTableRow33
            // 
            this.xrTableRow33.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell37});
            this.xrTableRow33.Dpi = 254F;
            this.xrTableRow33.Name = "xrTableRow33";
            this.xrTableRow33.Weight = 1D;
            // 
            // xrTableCell37
            // 
            this.xrTableCell37.Dpi = 254F;
            this.xrTableCell37.Name = "xrTableCell37";
            this.xrTableCell37.Weight = 3D;
            // 
            // GroupHeader1
            // 
            this.GroupHeader1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
            this.tbGarniHeader,
            this.xrLine1});
            this.GroupHeader1.Dpi = 254F;
            this.GroupHeader1.HeightF = 88.50001F;
            this.GroupHeader1.Name = "GroupHeader1";
            this.GroupHeader1.RepeatEveryPage = true;
            // 
            // tbGarniHeader
            // 
            this.tbGarniHeader.Dpi = 254F;
            this.tbGarniHeader.LocationFloat = new DevExpress.Utils.PointFloat(39.1521F, 25.00001F);
            this.tbGarniHeader.Name = "tbGarniHeader";
            this.tbGarniHeader.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
            this.xrTableRow4});
            this.tbGarniHeader.SizeF = new System.Drawing.SizeF(500F, 63.5F);
            // 
            // xrTableRow4
            // 
            this.xrTableRow4.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell3});
            this.xrTableRow4.Dpi = 254F;
            this.xrTableRow4.Name = "xrTableRow4";
            this.xrTableRow4.Weight = 1D;
            // 
            // xrTableCell3
            // 
            this.xrTableCell3.Dpi = 254F;
            this.xrTableCell3.Name = "xrTableCell3";
            this.xrTableCell3.Text = "xrTableCell206";
            this.xrTableCell3.Weight = 3D;
            // 
            // xrLine1
            // 
            this.xrLine1.BackColor = System.Drawing.Color.Transparent;
            this.xrLine1.BorderColor = System.Drawing.Color.DarkGray;
            this.xrLine1.BorderDashStyle = DevExpress.XtraPrinting.BorderDashStyle.Solid;
            this.xrLine1.Borders = DevExpress.XtraPrinting.BorderSide.Top;
            this.xrLine1.BorderWidth = 2F;
            this.xrLine1.Dpi = 254F;
            this.xrLine1.ForeColor = System.Drawing.Color.Transparent;
            this.xrLine1.LineWidth = 0;
            this.xrLine1.LocationFloat = new DevExpress.Utils.PointFloat(39.1521F, 0F);
            this.xrLine1.Name = "xrLine1";
            this.xrLine1.Padding = new DevExpress.XtraPrinting.PaddingInfo(1, 1, 1, 1, 254F);
            this.xrLine1.SizeF = new System.Drawing.SizeF(2823.848F, 14.27795F);
            this.xrLine1.StylePriority.UseBackColor = false;
            this.xrLine1.StylePriority.UseBorderColor = false;
            this.xrLine1.StylePriority.UseBorderDashStyle = false;
            this.xrLine1.StylePriority.UseBorders = false;
            this.xrLine1.StylePriority.UseBorderWidth = false;
            this.xrLine1.StylePriority.UseForeColor = false;
            this.xrLine1.StylePriority.UsePadding = false;
            // 
            // Header
            // 
            this.Header.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
            this.HeaderBand,
            this.DetailReport});
            this.Header.DataMember = "xWBHeader";
            this.Header.DataSource = this.oMyData;
            this.Header.Dpi = 254F;
            this.Header.Level = 0;
            this.Header.Name = "Header";
            // 
            // HeaderBand
            // 
            this.HeaderBand.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
            this.tbBedenEsleme,
            this.xrTable1,
            this.tbMD,
            this.xrTable3,
            this.x1,
            this.xrPictureBox1});
            this.HeaderBand.Dpi = 254F;
            this.HeaderBand.HeightF = 373.1445F;
            this.HeaderBand.MultiColumn.ColumnCount = 2;
            this.HeaderBand.Name = "HeaderBand";
            this.HeaderBand.BeforePrint += new System.Drawing.Printing.PrintEventHandler(this.HeaderBand_BeforePrint);
            // 
            // xrTable1
            // 
            this.xrTable1.Dpi = 254F;
            this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(25.00009F, 196.6736F);
            this.xrTable1.Name = "xrTable1";
            this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
            this.xrTableRow9});
            this.xrTable1.SizeF = new System.Drawing.SizeF(1255.161F, 76.72918F);
            // 
            // xrTableRow9
            // 
            this.xrTableRow9.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell5});
            this.xrTableRow9.Dpi = 254F;
            this.xrTableRow9.Name = "xrTableRow9";
            this.xrTableRow9.Weight = 1.2083331731360729D;
            // 
            // xrTableCell5
            // 
            this.xrTableCell5.Borders = DevExpress.XtraPrinting.BorderSide.None;
            this.xrTableCell5.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
            this.tbStyle});
            this.xrTableCell5.Dpi = 254F;
            this.xrTableCell5.Name = "xrTableCell5";
            this.xrTableCell5.StylePriority.UseBorders = false;
            this.xrTableCell5.Weight = 3D;
            // 
            // tbStyle
            // 
            this.tbStyle.Borders = DevExpress.XtraPrinting.BorderSide.None;
            this.tbStyle.Dpi = 254F;
            this.tbStyle.LocationFloat = new DevExpress.Utils.PointFloat(6.74991F, 0F);
            this.tbStyle.Name = "tbStyle";
            this.tbStyle.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
            this.xrTableRow1});
            this.tbStyle.SizeF = new System.Drawing.SizeF(1028.311F, 63.5F);
            this.tbStyle.StylePriority.UseBorders = false;
            // 
            // xrTableRow1
            // 
            this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell2});
            this.xrTableRow1.Dpi = 254F;
            this.xrTableRow1.Name = "xrTableRow1";
            this.xrTableRow1.Weight = 1D;
            // 
            // xrTableCell2
            // 
            this.xrTableCell2.Dpi = 254F;
            this.xrTableCell2.Name = "xrTableCell2";
            this.xrTableCell2.Weight = 3D;
            // 
            // tbMD
            // 
            this.tbMD.Dpi = 254F;
            this.tbMD.LocationFloat = new DevExpress.Utils.PointFloat(1290.744F, 196.6736F);
            this.tbMD.Name = "tbMD";
            this.tbMD.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
            this.xrTableRow2});
            this.tbMD.SizeF = new System.Drawing.SizeF(1556.172F, 63.49997F);
            // 
            // xrTableRow2
            // 
            this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell14});
            this.xrTableRow2.Dpi = 254F;
            this.xrTableRow2.Name = "xrTableRow2";
            this.xrTableRow2.Weight = 1D;
            // 
            // xrTableCell14
            // 
            this.xrTableCell14.Dpi = 254F;
            this.xrTableCell14.Name = "xrTableCell14";
            this.xrTableCell14.Weight = 3D;
            // 
            // xrTable3
            // 
            this.xrTable3.BorderColor = System.Drawing.Color.DimGray;
            this.xrTable3.Borders = DevExpress.XtraPrinting.BorderSide.None;
            this.xrTable3.Dpi = 254F;
            this.xrTable3.KeepTogether = true;
            this.xrTable3.LocationFloat = new DevExpress.Utils.PointFloat(2286F, 2.645833F);
            this.xrTable3.Name = "xrTable3";
            this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 3, 10, 254F);
            this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
            this.xrTableRow3,
            this.xrTableRow5,
            this.xrTableRow7,
            this.xrTableRow20});
            this.xrTable3.SizeF = new System.Drawing.SizeF(560.9163F, 194.0277F);
            this.xrTable3.StylePriority.UseBorderColor = false;
            this.xrTable3.StylePriority.UseBorders = false;
            this.xrTable3.StylePriority.UsePadding = false;
            // 
            // xrTableRow3
            // 
            this.xrTableRow3.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.x2,
            this.x2a});
            this.xrTableRow3.Dpi = 254F;
            this.xrTableRow3.Name = "xrTableRow3";
            this.xrTableRow3.Weight = 1D;
            // 
            // x2
            // 
            this.x2.Dpi = 254F;
            this.x2.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Bold);
            this.x2.Name = "x2";
            this.x2.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 9, 3, 3, 254F);
            this.x2.StylePriority.UseFont = false;
            this.x2.StylePriority.UsePadding = false;
            this.x2.StylePriority.UseTextAlignment = false;
            this.x2.Text = "Tarih";
            this.x2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
            this.x2.Weight = 1.1799995913085277D;
            // 
            // x2a
            // 
            this.x2a.Dpi = 254F;
            this.x2a.Name = "x2a";
            this.x2a.StylePriority.UseTextAlignment = false;
            this.x2a.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
            this.x2a.Weight = 2D;
            // 
            // xrTableRow5
            // 
            this.xrTableRow5.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.x3,
            this.x3a});
            this.xrTableRow5.Dpi = 254F;
            this.xrTableRow5.Name = "xrTableRow5";
            this.xrTableRow5.Weight = 1D;
            // 
            // x3
            // 
            this.x3.Dpi = 254F;
            this.x3.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Bold);
            this.x3.Name = "x3";
            this.x3.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 9, 3, 3, 254F);
            this.x3.StylePriority.UseFont = false;
            this.x3.StylePriority.UsePadding = false;
            this.x3.StylePriority.UseTextAlignment = false;
            this.x3.Text = "DosyaNo";
            this.x3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
            this.x3.Weight = 1.1799995913085277D;
            // 
            // x3a
            // 
            this.x3a.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "xWBHeader.DosyaNo")});
            this.x3a.Dpi = 254F;
            this.x3a.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Bold);
            this.x3a.ForeColor = System.Drawing.Color.Red;
            this.x3a.Name = "x3a";
            this.x3a.StylePriority.UseFont = false;
            this.x3a.StylePriority.UseForeColor = false;
            this.x3a.StylePriority.UseTextAlignment = false;
            this.x3a.Text = "x3a";
            this.x3a.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
            this.x3a.Weight = 2D;
            // 
            // xrTableRow7
            // 
            this.xrTableRow7.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell1,
            this.tcTermin});
            this.xrTableRow7.Dpi = 254F;
            this.xrTableRow7.Name = "xrTableRow7";
            this.xrTableRow7.Weight = 1D;
            // 
            // xrTableCell1
            // 
            this.xrTableCell1.Dpi = 254F;
            this.xrTableCell1.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Bold);
            this.xrTableCell1.Name = "xrTableCell1";
            this.xrTableCell1.StylePriority.UseFont = false;
            this.xrTableCell1.StylePriority.UseTextAlignment = false;
            this.xrTableCell1.Text = "Termin Tarihi";
            this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
            this.xrTableCell1.Weight = 1.1799995913085277D;
            // 
            // tcTermin
            // 
            this.tcTermin.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "xWBHeader.Termin", "{0:dd.MM.yyyy}")});
            this.tcTermin.Dpi = 254F;
            this.tcTermin.Name = "tcTermin";
            this.tcTermin.Weight = 2D;
            // 
            // xrTableRow20
            // 
            this.xrTableRow20.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.x36,
            this.x4a});
            this.xrTableRow20.Dpi = 254F;
            this.xrTableRow20.Name = "xrTableRow20";
            this.xrTableRow20.Weight = 1D;
            // 
            // x36
            // 
            this.x36.Dpi = 254F;
            this.x36.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Bold);
            this.x36.Name = "x36";
            this.x36.StylePriority.UseFont = false;
            this.x36.StylePriority.UseTextAlignment = false;
            this.x36.Text = "Atölye";
            this.x36.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
            this.x36.Weight = 1.1799995913085277D;
            // 
            // x4a
            // 
            this.x4a.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "xWBHeader.Atelye")});
            this.x4a.Dpi = 254F;
            this.x4a.Name = "x4a";
            this.x4a.StylePriority.UseTextAlignment = false;
            this.x4a.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
            this.x4a.Weight = 2D;
            // 
            // x1
            // 
            this.x1.Dpi = 254F;
            this.x1.Font = new System.Drawing.Font("Calibri", 26F, System.Drawing.FontStyle.Bold);
            this.x1.LocationFloat = new DevExpress.Utils.PointFloat(690.5625F, 0F);
            this.x1.Name = "x1";
            this.x1.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254F);
            this.x1.SizeF = new System.Drawing.SizeF(1510.242F, 103.1875F);
            this.x1.StylePriority.UseFont = false;
            this.x1.StylePriority.UseTextAlignment = false;
            this.x1.Text = "Kesim Bilgi Formu";
            this.x1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
            // 
            // xrPictureBox1
            // 
            this.xrPictureBox1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Bookmark", null, "xKF_Header.ModelNo")});
            this.xrPictureBox1.Dpi = 254F;
            this.xrPictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox1.Image")));
            this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
            this.xrPictureBox1.Name = "xrPictureBox1";
            this.xrPictureBox1.SizeF = new System.Drawing.SizeF(493.1834F, 129.6458F);
            this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.StretchImage;
            // 
            // tbBedenEsleme
            // 
            this.tbBedenEsleme.Dpi = 254F;
            this.tbBedenEsleme.LocationFloat = new DevExpress.Utils.PointFloat(1290.744F, 288.4779F);
            this.tbBedenEsleme.Name = "tbBedenEsleme";
            this.tbBedenEsleme.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
            this.trBedenDagilim});
            this.tbBedenEsleme.SizeF = new System.Drawing.SizeF(1556.172F, 63.49997F);
            // 
            // trBedenDagilim
            // 
            this.trBedenDagilim.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell4});
            this.trBedenDagilim.Dpi = 254F;
            this.trBedenDagilim.Name = "trBedenDagilim";
            this.trBedenDagilim.Weight = 1D;
            // 
            // xrTableCell4
            // 
            this.xrTableCell4.Dpi = 254F;
            this.xrTableCell4.Name = "xrTableCell4";
            this.xrTableCell4.Weight = 3D;
            // 
            // xrKesimBilgiFormu
            // 
            this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
            this.Detail,
            this.TopMargin,
            this.BottomMargin,
            this.ReportFooter,
            this.ReportHeader,
            this.Header,
            this.PageFooter});
            this.Bookmark = "ModelNo";
            this.Dpi = 254F;
            this.Font = new System.Drawing.Font("Calibri", 9.75F);
            this.Landscape = true;
            this.Margins = new System.Drawing.Printing.Margins(41, 41, 33, 30);
            this.PageHeight = 2100;
            this.PageWidth = 2970;
            this.PaperKind = System.Drawing.Printing.PaperKind.A4;
            this.ReportUnit = DevExpress.XtraReports.UI.ReportUnit.TenthsOfAMillimeter;
            this.SnapGridSize = 31.75F;
            this.StyleSheet.AddRange(new DevExpress.XtraReports.UI.XRControlStyle[] {
            this.xrControlStyle1});
            this.Version = "15.1";
            this.BeforePrint += new System.Drawing.Printing.PrintEventHandler(this.xrKesim_BeforePrint);
            ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.oMyData)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.xtGarni)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tbGarniHeader)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tbStyle)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tbMD)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tbBedenEsleme)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();

    }

    protected override void Dispose(bool disposing)
    {
        if (disposing && (components != null))
        {
            components.Dispose();
        }
        base.Dispose(disposing);
    } 
    #endregion

    public xrKesimBilgiFormu()
    {
        InitializeComponent();      
    }


    public xrKesimBilgiFormu(string _idx, string spNAme, bool eng = false)
        : this()
    {
        idx = _idx;
        SpName = spNAme;
        Eng = eng;

        if (eng)
            colCaptions = "ORDER".Split(';');
        else
            colCaptions = "SİPARİŞ".Split(';');
    }

    bool Eng = false;
    public string idx,SpName;    
    public string ModelCorpo;
    DataTable dtDetail = null;
    int BDWidth = 0;
    string[] colCaptions = null;

    void cell_BeforePrint(object sender, PrintEventArgs e)
    {
        Graphics gr = Graphics.FromHwnd(IntPtr.Zero);
        gr.PageUnit = GraphicsUnit.Millimeter;
        //int factor = 10;

        XRLabel label = (XRLabel)sender;

        float stringWidth = gr.MeasureString(label.Text, label.Font).Width;
        float labelWidth = label.WidthF;

        float newSize = 10.25f;
        /*
        if ( labelWidth < stringWidth * factor)
            newSize = label.Font.Size * label.Width / stringWidth / factor;
        else
            newSize = 10.5f;
        */
        label.Font = new Font(this.Font.FontFamily, newSize);
        gr.Dispose();
    }

    void cell_BeforePrint2(object sender, PrintEventArgs e)
    {
        Graphics gr = Graphics.FromHwnd(IntPtr.Zero);
        gr.PageUnit = GraphicsUnit.Millimeter;
        int factor = 10;

        XRLabel label = (XRLabel)sender;

        float stringWidth = gr.MeasureString(label.Text, label.Font).Width;
        float labelWidth = label.WidthF;

        float newSize = 10f;

        if ( labelWidth < stringWidth * factor)
            newSize = label.Font.Size * label.Width / stringWidth / factor;
        else
            newSize = 10f;

        label.Font = new Font(this.Font.FontFamily, newSize);
        gr.Dispose();
    }

    void cell_BeforePrint3(object sender, PrintEventArgs e)
    {
        Graphics gr = Graphics.FromHwnd(IntPtr.Zero);
        gr.PageUnit = GraphicsUnit.Millimeter;
        int factor = 10;

        XRLabel label = (XRLabel)sender;

        float stringWidth = gr.MeasureString(label.Text, label.Font).Width;
        float labelWidth = label.WidthF;

        float newSize = 10f;

        if (labelWidth < stringWidth * factor)
            newSize = label.Font.Size * label.Width / stringWidth / factor;
        else
            newSize = 10f;

        label.Font = new Font(this.Font.FontFamily, newSize,FontStyle.Bold);
        gr.Dispose();
    }

    private void xrKesim_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
    {
        this.PaperKind = PaperKind.A4;
        this.Landscape = true;
        DataSet ds = Session.DataManager.ExecuteDataSet(SpName, idx);

        x2a.Text = DateTime.Now.ToString("dd.MM.yyyy");

        oMyData.Clear();
        oMyData.EnforceConstraints = false;
        oMyData.xWBHeader.Merge(ds.Tables[0]);
        oMyData.xWBDetail.Merge(ds.Tables[1]);
        if (ds.Tables.Count>2)
        {
            oMyData.Merge(ds.Tables[2]);
        }


        oMyData.xWBDetail.Columns.Add("Top0", typeof(decimal), "BM0*Top");
        oMyData.xWBDetail.Columns.Add("Top1", typeof(decimal), "BM1*Top");
        oMyData.xWBDetail.Columns.Add("Top2", typeof(decimal), "BM2*Top");
        oMyData.xWBDetail.Columns.Add("Top3", typeof(decimal), "BM3*Top");
        oMyData.xWBDetail.Columns.Add("Top4", typeof(decimal), "BM4*Top");
        oMyData.xWBDetail.Columns.Add("Top5", typeof(decimal), "BM5*Top");
        oMyData.xWBDetail.Columns.Add("Top6", typeof(decimal), "BM6*Top");

        List<XRTable> tables = new List<XRTable>();
        tables.AddRange(new XRTable[] {
        });

        foreach (XRTable t in tables)
            foreach (XRTableRow r in t.Rows)
                foreach (XRTableCell cell in r)
                {
                    cell.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2);
                    cell.BeforePrint += new PrintEventHandler(cell_BeforePrint);
                    cell.WordWrap = false;
                }
    }
        

    private void HeaderBand_BeforePrint(object sender, PrintEventArgs e)
    {
        DataRowView dv = (DataRowView)HeaderBand.Report.GetCurrentRow();        
        int GarniAdedi = (int)dv.Row["GarniAdedi"];
        string model = dv.Row["StyleName"].ToString();

        CreateStyleTable("st_", 211, 611, "tbStyle");
        CreateMDTable();
        CreateGarniTable(GarniAdedi,model);
        if (SpName == "GetWBKesimBilgiFormu")
            CreateBedenEsleme(model);
    }

    private void CreateBedenEsleme(string model)
    {
        string colNameBD = "";

        List<string> BDCols = new List<string>();
        foreach (DataColumn dc in dtDetail.Columns)
            BDCols.Add(dc.ColumnName);

        DataTable dtBedenEsleme = oMyData.Tables["Table2"];

        if (dtBedenEsleme.Rows.Count > 0)
        {
            foreach (DataColumn dcBedenEsleri in dtBedenEsleme.Columns)
            {
                string colname = dcBedenEsleri.ColumnName;
                if (!BDCols.Contains(colname))
                    colNameBD += colname + ";";
            }

            foreach (string colName in colNameBD.Split(";".ToCharArray(), StringSplitOptions.RemoveEmptyEntries))
            {
                dtBedenEsleme.Columns.Remove(colName);
            }

            int BDcellWidth = (tbBedenEsleme.WidthF / dtBedenEsleme.Columns.Count).ToInt();

            tbBedenEsleme.BeginInit();
            tbBedenEsleme.Rows.Clear();

            tbBedenEsleme.HeightF = 250F;
            tbBedenEsleme.Borders = DevExpress.XtraPrinting.BorderSide.All;
            //xtGarni.Borders = DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom;
            XRTableRow tr;
            XRTableCell tc;

            #region Baslik
            tr = new XRTableRow();

            tr.HeightF = 250F;

            for (int i = 0; i < dtBedenEsleme.Columns.Count; i++)
            {
                tc = new XRTableCell();
                tc.WidthF = BDcellWidth;
                tc.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;

                tc.Text = dtBedenEsleme.Columns[i].ColumnName.Substring(1);

                tc.Font = new System.Drawing.Font(this.Font, FontStyle.Bold);
                tc.BackColor = Color.Gainsboro;
                tr.Cells.Add(tc);
            }

            #endregion

            foreach (XRTableCell xtc in tr.Cells)
                xtc.Angle = 90;

            tbBedenEsleme.Rows.Add(tr);

            tr = new XRTableRow();

            #region Beden


            for (int i = 0; i < colCaptions.Length; i++)
            {
                for (int j = 0; j < dtBedenEsleme.Columns.Count; j++)
                {
                    tc = new XRTableCell();
                    tc.WidthF = BDcellWidth;
                    tc.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
                    if (i < 1)
                    {
                        string currentColName = dtBedenEsleme.Columns[j].ColumnName;
                        tc.Text = dtBedenEsleme.Rows[0][currentColName].ToStr();
                        //tc.DataBindings.Add("Text", null, "xWBHeader.FK_xWBDetail_xWBHeader_style." + currentColName);
                    }
                    else
                        tc.BorderColor = Color.LightGray;


                    tr.Cells.Add(tc);
                }
            }

            #endregion

            tbBedenEsleme.Rows.Add(tr);
            tbBedenEsleme.EndInit();
        }

    }
    private void CreateStyleTable(string str,float tcWidth1,float tcWidth2,string tableName)
    {
        string strStyle = "";
        foreach (DataColumn dc in oMyData.xWBHeader.Columns)
        {
            string activeColName = dc.ColumnName;
            if (activeColName.StartsWith(str))
            {
                if (oMyData.xWBHeader.Select("ISNULL([" + activeColName + "],'')<>''").Length > 0)
                {
                    strStyle += activeColName + ";";
                }
            }
        }

        foreach (string colName in strStyle.Split(";".ToCharArray(), StringSplitOptions.RemoveEmptyEntries))
        {
            XRTableRow tr = new XRTableRow();

            XRTableCell tcBaslik = new XRTableCell();
            XRTableCell tcDetay = new XRTableCell();

            tcBaslik.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Bold);
            tcBaslik.BackColor = System.Drawing.Color.LightGray;
            tcBaslik.Text = colName.Substring(3, colName.Length - 3);
            tcBaslik.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
            tcBaslik.WidthF = tcWidth1;

            tcDetay.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "xWBHeader."+colName)});
            tcDetay.Font = new System.Drawing.Font("Calibri", 9F);
            tcDetay.Padding = new DevExpress.XtraPrinting.PaddingInfo(6, 3, 3, 3, 254F);
            tcDetay.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
            tcDetay.WidthF = tcWidth2;

            tr.Cells.AddRange(new XRTableCell[] { tcBaslik, tcDetay });
            tbStyle.Rows.Add(tr);
            ((XRTable)this.FindControl(tableName, false)).BorderColor = System.Drawing.Color.DimGray;
            ((XRTable)this.FindControl(tableName, false)).Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
            | DevExpress.XtraPrinting.BorderSide.Right)
            | DevExpress.XtraPrinting.BorderSide.Bottom)));
            ((XRTable)this.FindControl(tableName, false)).Rows.Add(tr);
        }
    }
    

    private void CreateMDTable()
    {
        string strModelDetay = "";
        foreach (DataColumn dc in oMyData.xWBHeader.Columns)
        {
            string activeColName = dc.ColumnName;
            if (activeColName.StartsWith("md"))
            {
                if (oMyData.xWBHeader.Select("ISNULL(" + activeColName + ",'')<>''").Length > 0)
                {
                    strModelDetay += activeColName + ";";
                }
            }
        }
        foreach (string colName in strModelDetay.Split(";".ToCharArray(), StringSplitOptions.RemoveEmptyEntries))
        {
            XRTableRow tr = new XRTableRow();

            XRTableCell tcBaslik = new XRTableCell();
            XRTableCell tcDetay = new XRTableCell();
          
            tcBaslik.Font = new System.Drawing.Font("Calibri", 10F, System.Drawing.FontStyle.Bold);
            tcBaslik.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 11, 5, 5, 254F);
            tcBaslik.Text = colName.Substring(2, colName.Length - 2);
            tcBaslik.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
            tcBaslik.WidthF = 294F;

            tcDetay.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
            new DevExpress.XtraReports.UI.XRBinding("Text", null, "xWBHeader."+colName)});
            tcDetay.Font = new System.Drawing.Font("Calibri", 9F);
            tcDetay.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 5, 5, 5, 254F);
            tcDetay.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
            tcDetay.WidthF = 1575.12F;

            tr.Cells.AddRange(new XRTableCell[] { tcBaslik, tcDetay });
            tbMD.Rows.Add(tr);

        }
    }

    private DataTable RemoveUnusedBDCols(DataTable dt)
    {
        string colNames = "";

        for (int i = 0; i < dt.Columns.Count; i++)
        {
            string activeColName = dt.Columns[i].ColumnName;


            if (activeColName.StartsWith("x"))
            {
                activeColName = "[" + dt.Columns[i].ColumnName + "]";
                if (dt.Select("ISNULL(" + activeColName + ",0)<>0").Length == 0)
                {
                    colNames += dt.Columns[i].ColumnName + ";";
                }
            }
            else
                colNames += dt.Columns[i].ColumnName + ";";
        }

        foreach (string colName in colNames.Split(";".ToCharArray(), StringSplitOptions.RemoveEmptyEntries))
        {
            dt.Columns.Remove(colName);
        }

        return dt;
    }
  
    private void CreateGarniTable(int GarniAdedi,string model)
    {
        int BDcellWidth = 70;
        DataRow[] drs = oMyData.xWBDetail.Select("Style ='" + model + "'");
        dtDetail = RemoveUnusedBDCols(drs.CopyToDataTable());
        BDWidth = dtDetail.Columns.Count * BDcellWidth + 270 + 50;

        xtGarni.BeginInit();
        xtGarni.Rows.Clear();
        tbGarniHeader.BeginInit();
        tbGarniHeader.Rows.Clear();

        int cellWidth = 300;
        int scanWidth = 150;
        float availableSpace = xrLine1.WidthF - BDWidth;
        if (!(cellWidth * (GarniAdedi + 1 ) + scanWidth <= availableSpace))
        {
            cellWidth = Convert.ToInt16((availableSpace - 10 - scanWidth) / (GarniAdedi + 1 ));
        }

        xtGarni.WidthF = tbGarniHeader.WidthF = xrLine1.WidthF; //cellWidth * (GarniAdedi + 1 + ProfiloAdedi);

        tbGarniHeader.HeightF = 250;        
        tbGarniHeader.Borders = DevExpress.XtraPrinting.BorderSide.All;
        xtGarni.Borders = DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom;
        XRTableRow tr;

        tr = new XRTableRow();

        #region Başlık


        XRTableCell tc = new XRTableCell();
        tc.WidthF = scanWidth;
        tc.Text = "Resim";
        tc.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
        tc.Font = new System.Drawing.Font(this.Font, FontStyle.Bold);
        tc.BackColor = Color.Gainsboro;
        tr.Cells.Add(tc);

        tc = new XRTableCell();
        tc.WidthF = cellWidth;
        tc.Text = "Beden Art.";
        tc.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
        tc.Font = new System.Drawing.Font(this.Font, FontStyle.Bold);
        tc.BackColor = Color.Gainsboro;
        tr.Cells.Add(tc);

        tc = new XRTableCell();
        tc.WidthF = 100;
        tc.Text = "En";
        tc.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
        tc.Font = new System.Drawing.Font(this.Font, FontStyle.Bold);
        tc.BackColor = Color.Gainsboro;
        tr.Cells.Add(tc);

        tc = new XRTableCell();
        tc.WidthF = 150;
        tc.Text = "Beden BM";
        tc.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
        tc.Font = new System.Drawing.Font(this.Font, FontStyle.Bold);
        tc.BackColor = Color.Gainsboro;
        tr.Cells.Add(tc);

        for (int i = 0; i < GarniAdedi; i++)
        {
            tc = new XRTableCell();
            tc.WidthF = cellWidth;
            tc.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
            tc.Text = "Garni" + (i + 1).ToString();
            tc.Font = new System.Drawing.Font(this.Font, FontStyle.Bold);
            tc.BackColor = Color.Gainsboro;
            tr.Cells.Add(tc);

            tc = new XRTableCell();
            tc.WidthF = 100;
            tc.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
            tc.Text = "Garni" + (i + 1).ToString() + "En";
            tc.Font = new System.Drawing.Font(this.Font, FontStyle.Bold);
            tc.BackColor = Color.Gainsboro;
            tr.Cells.Add(tc);

            tc = new XRTableCell();
            tc.WidthF = 150;
            tc.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
            tc.Text = "Garni" + (i + 1).ToString();
            tc.Font = new System.Drawing.Font(this.Font, FontStyle.Bold);
            tc.BackColor = Color.Gainsboro;
            tr.Cells.Add(tc);
        }

        for (int i = 0; i < dtDetail.Columns.Count + 1; i++)
        {
            tc = new XRTableCell();
            tc.WidthF = BDcellWidth;
            tc.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
            if (i == dtDetail.Columns.Count)
            {
                tc.Text = "Top.";
                tc.WidthF = 100;
            }
            else
            {
                tc.Text = dtDetail.Columns[i].ColumnName.Substring(1);
            }
            tc.Font = new System.Drawing.Font(this.Font, FontStyle.Bold);
            tc.BackColor = Color.Gainsboro;
            tr.Cells.Add(tc);
        }

        #endregion

        foreach (XRTableCell xtc in tr.Cells)
            xtc.Angle = 90;

        tbGarniHeader.Rows.Add(tr);
        tbGarniHeader.EndInit();

        tr = new XRTableRow();

        tc = new XRTableCell();
        tc.WidthF = scanWidth;
        tc.HeightF = scanWidth;
        tc.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;

        XRPictureBox xpic = new XRPictureBox();
        xpic.Dpi = 254;

        xpic.SizeF = new System.Drawing.SizeF(scanWidth, scanWidth);

        xpic.Borders = DevExpress.XtraPrinting.BorderSide.None;

        xpic.Sizing = DevExpress.XtraPrinting.ImageSizeMode.CenterImage;  // CenterImage;

        xpic.DataBindings.Add(new DevExpress.XtraReports.UI.XRBinding("Image", null, "xWBHeader.FK_xWBDetail_xWBHeader_style.Photo0"));
        tc.Controls.Add(xpic);
        //tc.BorderColor = Color.LightGray;
        tr.Cells.Add(tc);

        #region ProductName
        for (int i = 0; i < GarniAdedi + 1; i++)
        {
            tc = new XRTableCell();
            tc.WidthF = cellWidth;
            tc.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
            tc.Font = new Font(this.Font.FontFamily, 10.5f);

            XRTableCell tc2 = new XRTableCell();
            tc2.WidthF = 100;
            tc2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
            tc2.Font = new Font(this.Font.FontFamily, 10.5f);

            XRTableCell tc3 = new XRTableCell();
            tc3.WidthF = 150;
            tc3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
            tc3.Font = new Font(this.Font.FontFamily, 10.5f);

            if (i < 1)
            {
                tc.DataBindings.Add("Text", null, "xWBHeader.FK_xWBDetail_xWBHeader_style.AnaBeden");
                tc2.DataBindings.Add("Text", null, "xWBHeader.FK_xWBDetail_xWBHeader_style.En0");
                tc3.DataBindings.Add("Text", null, "xWBHeader.FK_xWBDetail_xWBHeader_style.CodeBM0");
            }
            else
            {
                tc.DataBindings.Add("Text", null, "xWBHeader.FK_xWBDetail_xWBHeader_style.Garni" + i.ToString());
                tc2.DataBindings.Add("Text", null, "xWBHeader.FK_xWBDetail_xWBHeader_style.En" + i.ToString());
                tc3.DataBindings.Add("Text", null, "xWBHeader.FK_xWBDetail_xWBHeader_style.CodeBM" + i.ToString());
            }
            tr.Cells.AddRange(new XRTableCell[] { tc, tc2, tc3 });
        }

        

        for (int i = 0; i < colCaptions.Length; i++)
        {

            for (int j = 0; j < dtDetail.Columns.Count + 1; j++)
            {
                tc = new XRTableCell();
                tc.WidthF = BDcellWidth;
                tc.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
                if (i < 1)
                {
                    if (j == dtDetail.Columns.Count)
                    {
                        tc.Font = new System.Drawing.Font(this.Font, FontStyle.Bold);
                        tc.BackColor = Color.LemonChiffon;
                        tc.BeforePrint += new PrintEventHandler(cell_BeforePrint);
                        tc.DataBindings.Add("Text", null, "xWBHeader.FK_xWBDetail_xWBHeader_style.Top");

                    }
                    else
                    {
                        string currentColName = dtDetail.Columns[j].ColumnName;
                        tc.DataBindings.Add("Text", null, "xWBHeader.FK_xWBDetail_xWBHeader_style." + currentColName);
                    }

                }
                else
                    tc.BorderColor = Color.LightGray;

                if (j == dtDetail.Columns.Count)
                    tc.WidthF = 100;

                tr.Cells.Add(tc);
            }
        }

        #endregion

        xtGarni.Rows.Add(tr);
        xtGarni.EndInit();

        foreach (XRTableRow row in xtGarni.Rows)
            row.Cells[0].WidthF = 150;

        tbGarniHeader.Rows[0].Cells[0].WidthF = 150;

        //tbGarniHeader.WidthF = xtGarni.WidthF = xrLine1.WidthF;
    }
    
}
